<template>
  <div class="box1">
    <el-container style="width:100%;margin: 0 auto;padding:0" id="container">
      <el-aside width="200px" style="padding:0">
          <!-- :default-active="activeIndex" -->
        <el-menu
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="rgb(233,238,243)"
          text-color="#000000"
          active-text-color="#2080F7"
          router
        >
          <!-- 路由项 -->
          <el-menu-item index="/MemberView">
            <span slot="title">会员卡</span>
          </el-menu-item>
          <el-menu-item index="/MyCollect">
            <span slot="title">我的收藏</span>
          </el-menu-item>
          <el-menu-item index="/LearningRecord">
            <span slot="title">学习记录</span>
          </el-menu-item>
          <el-menu-item index="/OrderManagement">
            <span slot="title">订单管理</span>
          </el-menu-item>
          <el-menu-item index="/PersonalInformation">
            <span slot="title">个人信息</span>
          </el-menu-item>
          <el-menu-item index="/AccountAndSecurity">
            <span slot="title">账号和安全</span>
          </el-menu-item>
          <el-menu-item index="/Authentication">
            <span slot="title">实名认证</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  name: 'MyHomePage',
  data () {
    return {
      // activeIndex: '/MemberView' // 默认选中
    }
  },
  mounted () {

  },
  methods: {
    handleOpen (key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style scoped>
div{
  font-family: 微软雅黑;
}
.home{
  height: 100%;
  z-index: 100;
}
.el-header, .el-footer {
  color: #333;
  text-align: center;
  line-height: 60px;
  border-bottom: rgb(213, 213, 213) 1px solid;
}

.el-aside {
  background-color: #E9EEF3;
  color: #333;
  text-align: center;
  line-height: 200px;
  height: 394px;
}

.el-main {
  background-color: rgb(244,244,244);
  color: #333;
  text-align: center;
}

body > .el-container {
  margin-bottom: 40px;
}
.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
#container{
  height: 100%;
}
.el-menu-item.is-active{
  background-color: rgb(248,248,248) !important;
  /* color: rgb(44, 47, 45); */
}
.div_header_left{
  width: 200px;
  height: 100%;
  float: left;
  /* background-color: red; */
}
.div_header_left p {
  margin: 0;
  padding: 0;
  line-height: 60px;
  text-align: center;
}
.div_header_right_1{
  width: 20px;
  height: 100%;
  float: right;
  text-align: center;
}
.div_header_right_2{
  width: 150px;
  height: 100%;
  float: right;
}
.div_header_right_2 p{
  margin: 0;
  padding: 0;
  line-height: 60px;
  text-align: center;
}
li.el-menu-item{
  text-align: left;
  /* margin-left: 12px; */
}
.el-icon-location:before {
  margin-left: -6px;
}
.el-submenu__title span{
  margin-right: 66px;
}
.box1 {
  width: 100%;
  height: 100%;
  margin-top: 60px;
  /* margin-left: -20px; */
  background-color: rgb(244,244,244);
  z-index: 100;
}
.box{
  background-color: rgb(244,244,244);
}
.el-menu-vertical-demo{
    position: static;
}
</style>
